/**
 * Created by Administrator on 2017/3/9 0009.
 */
import Relay from "react-relay";

export default class CodeValidateMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { codeValidate }`;
    }

    getVariables() { 
        return {
            argsInput: {
                phone: this.props.phone,
                code: this.props.code,
                token : this.props.token
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on codeValidatePayload {
            codeValidate {
                code
                totalResult
                value
                errorCode
                id
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on codeValidatePayload {
                    codeValidate {
                        code
                        totalResult
                        value
                        errorCode
                        id
                    }
                }
            `]
        }];
    }

}
